package com.hospital.warehouse.instock.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.hospital.warehouse.drugdicts.entity.Drugdicts;
import com.hospital.warehouse.storehouse.entity.Storehouse;
import com.hospital.warehouse.sys_user.entity.Sys_user;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author Mr. YR
 * @since 2020-04-22
 */

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("instock")
public class Instock extends Model<Instock> {

	private static final long serialVersionUID = 1L;

	@TableId(value = "is_id", type = IdType.AUTO)
	private Integer is_id;

	@TableField("is_drugid")
	private Integer is_drugid;
	@TableField(exist = false)
	private Drugdicts drug;

	@TableField("is_num")
	private Integer is_num;
	@TableField(exist = false)
	private Integer is_num_min;
	@TableField(exist = false)
	private Integer is_num_max;

	@TableField("is_price")
	private BigDecimal is_price;
	@TableField(exist = false)
	private BigDecimal is_price_min;
	@TableField(exist = false)
	private BigDecimal is_price_max;

	@TableField("is_totalmoney")
	private BigDecimal is_totalmoney;
	@TableField(exist = false)
	private BigDecimal is_totalmoney_min;
	@TableField(exist = false)
	private BigDecimal is_totalmoney_max;

	@TableField("is_batch")
	private String is_batch;

	@TableField("is_batchnum")
	private String is_batchnum;

	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
	@TableField("is_startdate")
	private Date is_startdate;
	@TableField(exist = false)
	private String is_startdate_interval;
	@TableField(exist = false)
	private Date is_startdate_min;
	@TableField(exist = false)
	private Date is_startdate_max;

	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
	@TableField("is_enddate")
	private Date is_enddate;
	@TableField(exist = false)
	private String is_enddate_interval;
	@TableField(exist = false)
	private Date is_enddate_min;
	@TableField(exist = false)
	private Date is_enddate_max;

	@TableField("is_effectivetime")
	private Integer is_effectivetime;

	@TableField("is_production")
	private String is_production;

	@TableField("is_remark")
	private String is_remark;

	@TableField("is_order")
	private String is_order;

	@TableField("is_state")
	private String is_state;

	@TableField("is_confirmid")
	private Integer is_confirmid;
	@TableField(exist = false)
	private Sys_user confirm;

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@TableField("is_arrivaltime")
	private Date is_arrivaltime;
	@TableField(exist = false)
	private String is_arrivaltime_interval;
	@TableField(exist = false)
	private Date is_arrivaltime_min;
	@TableField(exist = false)
	private Date is_arrivaltime_max;

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@TableField("is_completetime")
	private Date is_completetime;
	@TableField(exist = false)
	private String is_completetime_interval;
	@TableField(exist = false)
	private Date is_completetime_min;
	@TableField(exist = false)
	private Date is_completetime_max;

	@TableField("is_dp_id")
	private Integer is_dp_id;
	@TableField(exist = false)
	private Integer is_old_dp_id;

	@TableField("is_roomid")
	private Integer is_roomid;
	@TableField(exist = false)
	private Storehouse storehouse;

	@TableField("flag")
	private Integer flag;

	@Override
	protected Serializable pkVal() {
		return this.is_id;
	}

}
